package com.jmlong.dao;

import com.jmlong.domain.Book;
import com.jmlong.domain.BookItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
public interface BookDao {

    public Integer addBook(Book book);

    public Integer addBookItem(BookItem bookItem);

    public Integer updateBookStatus(String bookID);

    public Integer updateBookItemStatus(String bookID);

    public List<Book> getBook(@Param("userID") String userID, @Param("status") String status);

    public Book getBookByBookId(String bookID);

    public List<BookItem> getBookItemByBookId(String bookID);

    public List<BookItem> getMerchantBook(String id);

    public Integer shipment(@Param("bookID") String bookID,@Param("commodityID")String commodityID);

    public Integer cancelBook(String bookID);
    public Integer cancelBookItem(String bookID);

    public Integer userConfirmBookHarvest(@Param("bookID") String bookID,@Param("commodityID")String commodityID);

    /**服务器专用接口**/

    public List<BookItem> getBookItemByCommodityID(String uuid);

}
